package jh.jianguan.springboot.util.common.exception;

import jh.jianguan.springboot.dto.common.exception.MyException;


/**
 * @description: 异常工具类
 * @author: guoc
 * @createDate: 2020/11/27 14:06
 */
public final class ExceptionUtil {

    public  ExceptionUtil(){}

    public static MyException mxe(String msg, Throwable t, Object... params){
        return new MyException(String.format("%s,【参数】%s",msg, params),t);
    }

    public static MyException mxe(String msg, Object... params){
        return new MyException(String.format("%s,【参数】%s",msg, params));
    }

    public static MyException mxe(String msg){
        return new MyException(msg);
    }

    public static MyException mxe(Throwable t){
        return new MyException(t);
    }

}
